<!DOCTYPE html>

<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">

<title>class StartProject::Options - RDoc Documentation</title>

<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
</script>

<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>


<body id="top" class="class">
<nav id="metadata">
  <nav id="home-section" class="section">
  <h3 class="section-header">
    <a href="../index.html">Home</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </h3>
</nav>


  <nav id="search-section" class="section project-section" class="initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <h3 class="section-header">
      <input type="text" name="search" placeholder="Search" id="search-field"
             title="Type to search, Up and Down to navigate, Enter to load">
    </h3>
  </form>

  <ul id="search-results" class="initially-hidden"></ul>
</nav>


  <div id="file-metadata">
    <nav id="file-list-section" class="section">
  <h3 class="section-header">Defined In</h3>
  <ul>
    <li>lib/start_project/options.rb
  </ul>
</nav>

    
  </div>

  <div id="class-metadata">
    
    <nav id="parent-class-section" class="section">
  <h3 class="section-header">Parent</h3>
  
  <p class="link">Object
  
</nav>

    
    <!-- Method Quickref -->
<nav id="method-list-section" class="section">
  <h3 class="section-header">Methods</h3>

  <ul class="link-list">
    
    <li><a href="#method-c-new">::new</a>
    
  </ul>
</nav>

  </div>

  <div id="project-metadata">
    <nav id="fileindex-section" class="section project-section">
  <h3 class="section-header">Pages</h3>

  <ul>
  
    <li class="file"><a href="../README.html">README</a>
  
  </ul>
</nav>

    <nav id="classindex-section" class="section project-section">
  <h3 class="section-header">Class and Module Index</h3>

  <ul class="link-list">
  
    <li><a href="../StartProject.html">StartProject</a>
  
    <li><a href="../StartProject/Downloader.html">StartProject::Downloader</a>
  
    <li><a href="../StartProject/Options.html">StartProject::Options</a>
  
    <li><a href="../StartProject/Runner.html">StartProject::Runner</a>
  
    <li><a href="../OptionsTest.html">OptionsTest</a>
  
  </ul>
</nav>

  </div>
</nav>

<div id="documentation">
  <h1 class="class">class StartProject::Options</h1>

  <div id="description" class="description">
    
<p>Read the arguments from the command line and parse them out</p>

  </div><!-- description -->

  
  
  
  <section id="5Buntitled-5D" class="documentation-section">
    

    

    

    
    <!-- Attributes -->
    <section id="attribute-method-details" class="method-section section">
      <h3 class="section-header">Attributes</h3>

      
      <div id="attribute-i-frameworks" class="method-detail">
        <div class="method-heading attribute-method-heading">
          <span class="method-name">frameworks</span><span
            class="attribute-access-type">[R]</span>
        </div>

        <div class="method-description">
        
        <p>frameworks stores the framework details loaded from the config.yaml</p>
        
        </div>
      </div>
      
      <div id="attribute-i-project_name" class="method-detail">
        <div class="method-heading attribute-method-heading">
          <span class="method-name">project_name</span><span
            class="attribute-access-type">[R]</span>
        </div>

        <div class="method-description">
        
        <p><a href="Options.html#attribute-i-project_name">#project_name</a> stores
the name of the folder that the final project will live in</p>
        
        </div>
      </div>
      
      <div id="attribute-i-project_uri" class="method-detail">
        <div class="method-heading attribute-method-heading">
          <span class="method-name">project_uri</span><span
            class="attribute-access-type">[R]</span>
        </div>

        <div class="method-description">
        
        <p><a href="Options.html#attribute-i-project_uri">#project_uri</a> stores the
url of the framework</p>
        
        </div>
      </div>
      
    </section><!-- attribute-method-details -->
    

    <!-- Methods -->
    
     <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
      <h3 class="section-header">Public Class Methods</h3>

    
      <div id="method-c-new" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">new</span><span
            class="method-args">(argv)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Initializes the options object, loads the config.yaml that stores all the
frameworks available  and sets a default framework: html5 boilerplate.
Finally, it calls the parse method.</p>
          

          
          <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File lib/start_project/options.rb, line 25</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">argv</span>)
  <span class="ruby-ivar">@frameworks</span> = <span class="ruby-keyword">begin</span>
  <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load_file</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword">__FILE__</span>),<span class="ruby-string">'config.yaml'</span>))
  <span class="ruby-keyword">rescue</span> <span class="ruby-constant">ArgumentError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
     <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Could not parse YAML #{e.message}&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-ivar">@project_uri</span> = <span class="ruby-ivar">@frameworks</span>[<span class="ruby-value">:html5</span>]
  <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">argv</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- new-source -->
          
        </div>

        

        
      </div><!-- new-method -->

    
    </section><!-- public-class-method-details -->
  
  </section><!-- 5Buntitled-5D -->

</div><!-- documentation -->


<footer id="validator-badges">
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
  <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
</footer>

